﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DsTieuThuc" targetNamespace="http://tempuri.org/DsTieuThuc.xsd" xmlns:mstns="http://tempuri.org/DsTieuThuc.xsd" xmlns="http://tempuri.org/DsTieuThuc.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="QLKD29112012ConnectionString1" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="QLKD29112012ConnectionString1 (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.QLKDMain.Properties.Settings.GlobalReference.Default.QLKD29112012ConnectionString1" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TieuThucQuanLyTableAdapter" GeneratorDataComponentClassName="TieuThucQuanLyTableAdapter" Name="TieuThucQuanLy" UserDataComponentName="TieuThucQuanLyTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="QLKD29112012ConnectionString1 (Settings)" DbObjectName="QLKD29112012.dbo.TieuThucQuanLy" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [TieuThucQuanLy] WHERE (([ID] = @Original_ID) AND ([TenTieuThuc] = @Original_TenTieuThuc) AND ([Kieu] = @Original_Kieu) AND ((@IsNull_NoiDungID = 1 AND [NoiDungID] IS NULL) OR ([NoiDungID] = @Original_NoiDungID)) AND ((@IsNull_MoTa = 1 AND [MoTa] IS NULL) OR ([MoTa] = @Original_MoTa)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_TenTieuThuc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TenTieuThuc" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Kieu" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Kieu" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_NoiDungID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NoiDungID" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_NoiDungID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NoiDungID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_MoTa" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="MoTa" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_MoTa" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MoTa" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [TieuThucQuanLy] ([TenTieuThuc], [Kieu], [NoiDungID], [MoTa]) VALUES (@TenTieuThuc, @Kieu, @NoiDungID, @MoTa);
SELECT ID, TenTieuThuc, Kieu, NoiDungID, MoTa FROM TieuThucQuanLy WHERE (ID = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TenTieuThuc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TenTieuThuc" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Kieu" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Kieu" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@NoiDungID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NoiDungID" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@MoTa" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MoTa" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TieuThucQuanLy.*
FROM            TieuThucQuanLy</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [TieuThucQuanLy] SET [TenTieuThuc] = @TenTieuThuc, [Kieu] = @Kieu, [NoiDungID] = @NoiDungID, [MoTa] = @MoTa WHERE (([ID] = @Original_ID) AND ([TenTieuThuc] = @Original_TenTieuThuc) AND ([Kieu] = @Original_Kieu) AND ((@IsNull_NoiDungID = 1 AND [NoiDungID] IS NULL) OR ([NoiDungID] = @Original_NoiDungID)) AND ((@IsNull_MoTa = 1 AND [MoTa] IS NULL) OR ([MoTa] = @Original_MoTa)));
SELECT ID, TenTieuThuc, Kieu, NoiDungID, MoTa FROM TieuThucQuanLy WHERE (ID = @ID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TenTieuThuc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TenTieuThuc" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Kieu" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Kieu" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@NoiDungID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NoiDungID" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@MoTa" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MoTa" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_TenTieuThuc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TenTieuThuc" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Kieu" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Kieu" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_NoiDungID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NoiDungID" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_NoiDungID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="NoiDungID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_MoTa" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="MoTa" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_MoTa" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MoTa" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="ID" ColumnName="ID" DataSourceName="QLKD29112012.dbo.TieuThucQuanLy" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ID" DataSetColumn="ID" />
              <Mapping SourceColumn="TenTieuThuc" DataSetColumn="TenTieuThuc" />
              <Mapping SourceColumn="Kieu" DataSetColumn="Kieu" />
              <Mapping SourceColumn="NoiDungID" DataSetColumn="NoiDungID" />
              <Mapping SourceColumn="MoTa" DataSetColumn="MoTa" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DsTieuThuc" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="DsTieuThuc" msprop:Generator_UserDSName="DsTieuThuc" msprop:EnableTableAdapterManager="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="TieuThucQuanLy" msprop:Generator_UserTableName="TieuThucQuanLy" msprop:Generator_RowDeletedName="TieuThucQuanLyRowDeleted" msprop:Generator_TableClassName="TieuThucQuanLyDataTable" msprop:Generator_RowChangedName="TieuThucQuanLyRowChanged" msprop:Generator_RowClassName="TieuThucQuanLyRow" msprop:Generator_RowChangingName="TieuThucQuanLyRowChanging" msprop:Generator_RowEvArgName="TieuThucQuanLyRowChangeEvent" msprop:Generator_RowEvHandlerName="TieuThucQuanLyRowChangeEventHandler" msprop:Generator_TablePropName="TieuThucQuanLy" msprop:Generator_TableVarName="tableTieuThucQuanLy" msprop:Generator_RowDeletingName="TieuThucQuanLyRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="ID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInTable="IDColumn" type="xs:int" />
              <xs:element name="TenTieuThuc" msprop:Generator_UserColumnName="TenTieuThuc" msprop:Generator_ColumnPropNameInRow="TenTieuThuc" msprop:Generator_ColumnVarNameInTable="columnTenTieuThuc" msprop:Generator_ColumnPropNameInTable="TenTieuThucColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="500" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Kieu" msprop:Generator_UserColumnName="Kieu" msprop:Generator_ColumnPropNameInRow="Kieu" msprop:Generator_ColumnVarNameInTable="columnKieu" msprop:Generator_ColumnPropNameInTable="KieuColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="NoiDungID" msprop:Generator_UserColumnName="NoiDungID" msprop:Generator_ColumnPropNameInRow="NoiDungID" msprop:Generator_ColumnVarNameInTable="columnNoiDungID" msprop:Generator_ColumnPropNameInTable="NoiDungIDColumn" type="xs:int" minOccurs="0" />
              <xs:element name="MoTa" msprop:Generator_UserColumnName="MoTa" msprop:Generator_ColumnPropNameInRow="MoTa" msprop:Generator_ColumnVarNameInTable="columnMoTa" msprop:Generator_ColumnPropNameInTable="MoTaColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="500" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Choose" msprop:Generator_UserColumnName="Choose" msprop:Generator_ColumnPropNameInRow="Choose" msprop:Generator_ColumnVarNameInTable="columnChoose" msprop:Generator_ColumnPropNameInTable="ChooseColumn" type="xs:boolean" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:TieuThucQuanLy" />
      <xs:field xpath="mstns:ID" />
    </xs:unique>
  </xs:element>
</xs:schema>